<template>
  <div class="node_tree_wrapper">
    <template v-for="item in treeChild" :key="item.id">
      <TreeItem :nodeItem="item" :level="1" />
    </template>
  </div>
</template>

<script setup>
import TreeItem from './tree-item.vue';
// 城市-》县-》区-》权限-》矿
// type:1 2 3 4 5 6
const treeChild = [
  {
    type: 1,
    id: 'k1',
    title: '市区',
    children: [
      {
        type: 2,
        id: 'k11',
        title: '县',
        children: [
          {
            type: 3,
            id: 'k111',
            title: '区',
            children: [
              {
                type: 4,
                id: 'k111',
                title: '权限',
                children: [
                  {
                    type: 5,
                    id: 'k1111',
                    title: '矿山',
                    children: null
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  {
    type: 1,
    id: 'k2',
    title: '市区',
    children: [
      {
        type: 2,
        id: 'k21',
        title: '县',
        children: null
      }
    ]
  }
];
</script>
